package com.txzhang.springcloud.storageservice.service;

import com.txzhang.springcloud.storageservice.config.Config;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(value = "good-server", configuration = Config.class)
public interface GoodService {

    /**
     * 减少good的id
     * @param goodCode
     * @param count 商品数量
     */
    @PostMapping("/good/reduce")
    void reduce(@RequestParam("goodCode") String goodCode, @RequestParam("count") Integer count);
}
